var CronJob = require('cron').CronJob;
var moment = require('moment');
var tcpp = require('tcp-ping');
var HostsManage = require('./HostsManage');

var job = new CronJob({
    cronTime: '* * * * * *',
    onTick: function () {
        console.info(moment().format('(x)YYYY-MM-DD HH:mm:ss.SSS'));
        HostsManage.pingAllHosts();
    },
    start: false
});
job.start();